package com.zlc.common.util.wrapper;

import com.github.xiaoymin.swaggerbootstrapui.util.CommonUtils;
import com.zlc.common.util.DateUtils;
import com.zlc.common.util.LocalDateUtils;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

public class SqlHelper {


    public static String inStr(List<String> values){
        StringBuilder builder = new StringBuilder("(");
        for (int i = 0; i < values.size(); i++) {
            Object o = values.get(i);
            dateTypeTransfer(o,builder);
            if (i < values.size() - 1) {
                builder.append(",");
            }
        }
        builder.append(") ");
        return builder.toString();
    }



    private static void dateTypeTransfer(Object o,StringBuilder builder){
        if(o instanceof String){
            builder.append("'").append(o.toString()).append("'");
        }else if(o instanceof Number){
            builder.append(o);
        }else{
            builder.append("'").append(o.toString()).append("'");
        }
    }
}
